Skip to content

Conversation

@Spenhouet
Copy link
Contributor

Provide the PollingInterval of the ScaledObject as parameter in the HTTPScaledObject.

Checklist

Fixes #1251

Copy link
Member

@wozniakjan wozniakjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you!

ptal @zroubalik, I know you are not a big fan of duplicating fields between HTTPScaledObject and ScaledObject but imho this one also makes sense because the operator sets this to a hardcoded 15s and patches over any custom changes to the ScaledObject made by the user

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternate proposal:

What if we just remove the hardcoded 15s and let it on ScaledObject?

This project is still beta so backwards compatibility is something we can ingore for certain cases and I think this one is a good one.

@JorTurFer
Copy link
Member

JorTurFer commented Feb 13, 2025

The add-on is connected to KEDA as external-push scaler, so the polling interval isn't so relevant indeed.
When there is a change on the "active" state, the add-on pushes the change automatically, so the activation/deactivation is notified instantly. About using the polling interval to cache metrics, I don't think that HTTP Add-on metrics should be cached

I don't have in my mind all the add-on details atm, but I think that it's more or less how I have described.

Which is the goal of changing the pollingInterval value?

@Spenhouet
Copy link
Contributor Author

@JorTurFer Maybe I'm misunderstanding something, but our goal is to reduce the time of the polling interval to ensure fast scaling. Right now we solved it by not using the HTTPScaledObject and instead directly using a ScaledObject, which allows to set the polling interval. Adding this config enables us to remove that workaround.

@JorTurFer
Copy link
Member

JorTurFer commented Feb 18, 2025

My point is that I'm not sure if you're actually getting an advantage in the scaling or it's just a useless parameter.
For the scaling phase (1-N-1), the querying period is every 15 seconds as default (HPA default value configured at control plane level) and for the activation phase (0-1-0) I'm 99% sure that it doesn't apply because HTTP Add-on uses external-push scaler, that actively monitors the active status, scaling from 0 as soon as the http-add-on external scaler detects a single request

I mean, if you set a crazily high value (like 300 or 3000), do you need to wait up to those seconds to scale from 0 or your workload is scaled instantly? If it's scaled instantly, the pollingInterval doesn't make sense

@zroubalik
Copy link
Member

zroubalik commented Feb 19, 2025

The add-on is connected to KEDA as external-push scaler, so the polling interval isn't so relevant indeed.

Yes, omg what I was thinking before 🤦‍♂️ 😄 Too much context-switching probably.

@Spenhouet pollingInterval is not used at all by this addon, the activation happens almost immediatelly when the scaler tells KEDA to do 0->1. So this particular config doesn't affect anything.

@wozniakjan
Copy link
Member

The add-on is connected to KEDA as external-push scaler, so the polling interval isn't so relevant indeed.

yeah, that is a good point, not sure how I managed to forget this...

@Spenhouet pollingInterval is not used at all by this addon, the activation happens almost immediatelly when the scaler tells KEDA to do 0->1. So this particular config doesn't affect anything.

and given this, I think it's safe to close this PR without a merge, apologies for the confusion I caused earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PollingInterval configuration to HTTPScaledObject

4 participants